<template>
  <div class="data-card">
    <el-card :body-style="{ padding: '0px' }">
      <div class="card-content">
        <div class="left-icon" :style="{ backgroundColor: cardData.color }">
          <i
            :class="`el-icon-${cardData.icon}`"
            type="primary"
            size="large"
          ></i>
        </div>
        <div class="right-data">
          <h4>¥{{ cardData.value }}</h4>
          <div class="order">{{ cardData.name }}</div>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    cardData: {
      type: Object,
      default: () => ({
        name: "今日支付订单",
        value: 1234,
        icon: "success",
        color: "#2ec7c9",
      }),
    },
  },
  components: {},
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {},
};
</script>

<style scoped lang="less">
.data-card {
  //   display: flex;
  width: 260px;
  margin-bottom: 20px;

  .card-content {
    display: flex;
    .left-icon {
      //   height: 70px;
      width: 70px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .right-data {
      margin: 10px;
      h4 {
        margin-bottom: 5px;
      }
      .order {
        font-size: 12px;
        color: rgb(142, 138, 138);
      }
    }
  }
}
</style>
